/* 
 * File:   periodic_system_group_item.cpp
 * Author: jolo
 * 
 * Created on: 12. Oktober 2011, 06:37
 * Lincense: New BSD License (The BSD 2-Clause License)
 */

#include "periodic_system_group_item.hpp"

#include <model/repository.hpp>
#include <model/chemical_element.hpp>

#include "chemical_element_item.hpp"

namespace gui
{
    periodic_system_group_item::periodic_system_group_item(model::repository_ptr r)
    : widgets::group_item(QObject::tr("Periodic System"), r)
    {
        BOOST_FOREACH(model::chemical_element_ptr e, r->chemical_elements()) {
            chemical_element_item* i = new chemical_element_item(e);
            appendRow(i);
        }
    }

    periodic_system_group_item::~periodic_system_group_item()
    {
    }

}